ENH: Add cibuildwheel and automated PyPI release - #66
Conversation
| @@ -1,2 +1,7 @@ | |||
| [build-system] | |||
| requires = ['setuptools', 'wheel', 'Cython>=3.0', 'numpy'] | |||
| requires = ['setuptools', 'wheel', 'Cython>=3.0', 'numpy>=2'] | |||
There was a problem hiding this comment.
I'd suggest updating the python min to 3.10 at the same time (3.9 is EOL Oct 30), happy to push that. Building with NumPy >= 2 is useful to ensure that code is both NumPy 1.x and 2.x compatible. But I can roll this back if needed and just make sure that cibuildwheel installs a NumPy >= 2, though it does complicate the code a bit.
|
I also just saw #54... after this PR is merged, if someone bumps the version in |
|
Modified to use EDIT: Appears to have worked: https://github.com/larsoner/surfa/actions/runs/19711633336/job/56473558969 |
|
Rebased and green here 🚀 |
Updated OS runners
Dropped duplicate macos-14 and macos-14-large (this one requires payment so we can live without the intel tests for now)
…rkflow to only trigger on tagged release. Updated os matrix to match test workflow.
Fixing merge conflict
|
The actions file for building the wheels and modernizing the pyprojecet.toml is greatly appreciated! |
FWIW I wouldn't let that stop you from publishing wheels for the platforms enabled above. Having some usable wheels out there is better than none IMO. Also, wheels compiled using NumPy 2 should work with NumPy 1.0, so any of the wheels here should be usable with NumPy 1.x already. I can probably fairly easily modify the build to support Python 3.8 and 3.9 etc. I'll see if it's easy enough... |
|
Hmmm from the pushes the setup here now does some unexpected stuff... some PR discussion probably would have been useful rather than pushing commits I think. For example:
I'm happy to open a PR to restore some of this stuff if it helps, and happy to discuss / clarify more if it helps! |
|
On and one more last, hopefully minor point -- locally running fails, so I expect CIs to fail. It actually fails in the testing step because it tries to build SciPy from source for the |
|
Happy to discuss the changes further, should have started there. I'd like to hold off on distributing the wheels until we can drop numpy 1.X support. You're absolutely right that it should work with the backwards compatibility in the ABI, however since equivalent behavior isn't a guarantee I'd prefer to hold off on distributing them for now.
Last message seems entirely reasonable to me |
Closes #64
Closes #17
Seems to be working:
https://github.com/larsoner/surfa/actions/runs/18286055605
Also enables PyPI automated publishing when a tagged release is cut